package com.gf.firstDemo;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@EnableAutoConfiguration
@RestController
@RequestMapping("/user")
public class Example1 {

	@RequestMapping("/{id}")  
    public User view(@PathVariable("id") String id) {  
        User user = new User();  
//        user.setId(id);  
//        user.setName("zhang");  
        return user;  
    }  
}
